import { getQueryCourses } from "@/api/courses";


//查询条件
export const queryCondition = ref({
    currentPage: 1,
    pageSize:10,
    status:"",
})


//查询结果
export const queriedResult = ref({})

//查询方法`
export const queryCourses = async (params) => {
   Object.assign(queryCondition.value, params)
    const {data} =  await getQueryCourses(queryCondition.value)
   if(data.code === '000000'){
    queriedResult.value = data.data
    console.log(data.data)
   } else {
    ElMessage.error('获取课程列表信息失败')
    throw new Error('获取课程列表信息失败' + data.mesg)
   }
}
